/**
 * @Author 12629
 * @Description：
 */
public class Date {
    public int year;
    public int month;
    public int day;


    public Date() {
        this(1990,1,1);
        System.out.println("不带参数的构造方法....");
    }

    public Date(int year,int month,int day) {
        //this();
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("带3个参数的构造方法....");
    }

    public void setDate(int year,int month,int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void printDate() {
        System.out.println(this.year+" 年 "+this.month+" 月 " +this.day+" 日");
    }

    public static void main(String[] args) {
        Date date = new Date();
        date.printDate();
    }



    public static void main3(String[] args) {
        Date date = new Date(2008,8,8);
        date.printDate();

        Date date2 = new Date();

    }


    public static void main2(String[] args) {
        Date date = new Date();
        date.printDate();
    }




    public static void main1(String[] args) {

        Date date = new Date();
        date.setDate(1998,6,6);
        date.printDate();

        System.out.println("===========");
        Date date2 = new Date();
        date2.setDate(2008,8,8);
        date2.printDate();
    }
}
